package my.org.swing.date;

import java.awt.Color;
import java.awt.Font;

public class DateTheme {

    private static boolean darkTheme = true;

    private static boolean largeMode = true;

    public static String prePageText = "上一页";

    public static String nextPageText = "下一页";

    public static int animationTime = 200;

    public static int windowWidth = 350;

    public static int windowHeight = 350;

    public static int smallCellSize = 42;

    public static int bigCellSize = 70;

    public static Font weekHeaderFont = new Font("dialog", Font.BOLD, 16);

    public static Font currentPageCellFont = new Font("dialog", Font.BOLD, 16);

    public static Font otherPageCellFont = new Font("dialog", Font.PLAIN, 15);

    public static Color backColor = new Color(3, 23, 43);

    public static Color weekHeaderForeground = Color.white;

    public static Color cellMarkedBackground = new Color(36, 144, 220);

    public static Color cellMarkedForeground = Color.white;

    public static Color cellMarkedLineColor = Color.black;

    public static Color cellSelectedBorderColor = cellMarkedBackground;

    public static Color cellRolloverBorderColor = new Color(250, 250, 250, 120);

    public static Color currentPageForeground = Color.white;

    public static Color otherPageForeground = Color.lightGray;

    public static Color cellRolloverStartColor = new Color(250, 250, 250, 120);

    public static Color cellRolloverEndColor = new Color(250, 250, 250, 0);

    public static Color timeTextForeground = Color.white;

    public static Color prePageForeground = Color.white;

    public static Color nextPageForeground = Color.white;

    public static boolean isDarkTheme() {
        return darkTheme;
    }

    public static boolean isLargeMode() {
        return largeMode;
    }

    public static void changeLargeDarkTheme(){
        changeLargeMode();
        changeDarkTheme();
    }

    public static void changeLargeLightTheme(){
        changeLargeMode();
        changeLightTheme();
    }

    public static void changeSmallMode() {
        largeMode = false;
        windowWidth = 210;
        windowHeight = 210;
        smallCellSize = 22;
        bigCellSize = 36;
        weekHeaderFont = new Font("dialog", Font.BOLD, 14);
        currentPageCellFont = new Font("dialog", Font.BOLD, 14);
        otherPageCellFont = new Font("dialog", Font.PLAIN, 12);
    }

    public static void changeLargeMode() {
        largeMode = true;
        windowWidth = 350;
        windowHeight = 350;
        smallCellSize = 42;
        bigCellSize = 70;
        weekHeaderFont = new Font("dialog", Font.BOLD, 16);
        currentPageCellFont = new Font("dialog", Font.BOLD, 16);
        otherPageCellFont = new Font("dialog", Font.PLAIN, 15);
    }

    public static void changeDarkTheme() {
        darkTheme = true;
        backColor = new Color(3, 23, 43);
        weekHeaderForeground = Color.white;
        cellMarkedBackground = new Color(36, 144, 220);
        cellSelectedBorderColor = cellMarkedBackground;
        cellMarkedLineColor = Color.black;
        cellRolloverBorderColor = new Color(250, 250, 250, 120);
        currentPageForeground = Color.white;
        otherPageForeground = Color.lightGray;
        cellRolloverStartColor = new Color(250, 250, 250, 120);
        cellRolloverEndColor = new Color(250, 250, 250, 0);
        timeTextForeground = Color.white;
        prePageForeground = Color.white;
        nextPageForeground = Color.white;
    }

    public static void changeLightTheme() {
        darkTheme = false;
        backColor = new Color(245, 245, 245);
        weekHeaderForeground = Color.black;
        cellMarkedBackground = new Color(36, 144, 220);
        cellMarkedLineColor = Color.white;
        cellSelectedBorderColor = cellMarkedBackground;
        cellRolloverBorderColor = new Color(150, 150, 150, 150);
        currentPageForeground = Color.black;
        otherPageForeground = new Color(120, 120, 120);
        cellRolloverStartColor = new Color(150, 150, 150, 150);
        cellRolloverEndColor = new Color(150, 150, 150, 0);
        timeTextForeground = Color.black;
        prePageForeground = Color.black;
        nextPageForeground = Color.black;
    }
}
